package com.mouse.hxsj.entity.enums;

import com.mouse.damo.micro.Com;
import com.mouse.hxsj.service.ActionService;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

/**
 * 操作
 */
@Slf4j
@AllArgsConstructor
@Getter
public enum ActionEnum {
    /**
     * 两小时双倍经验
     */
    //Action
    exp2_2hour(0, 0);
    private int key1;
    private int key2;

    public boolean exec(Com com) {
        if (exp2_2hour.equals(this)) {
            ActionService actionService = new ActionService();
            for (int i = 0; i < 3; i++) {
                boolean flag = actionService.expTwo2hour(com);
                if (flag) break;
            }
        }
        return true;
    }
}
